import {create} from 'zustand';

interface ThemeStore {
  theme: string;
  primaryColor: string;
}

export interface ThemeStoreState extends ThemeStore {
  setStore<K extends keyof ThemeStore>(key: K, value: ThemeStore[K]): void;
}

const useThemeStore = create<ThemeStoreState>(set => ({
  theme: 'light',
  primaryColor: 'red',
  setStore: (key, value) => set({[key]: value}),
}));

export {useThemeStore};
